fix: add always() to run-codex job to handle skipped dependency#703
fix: add always() to run-codex job to handle skipped dependency#703
Conversation
The run-codex job depends on resolve-trivial-conflicts, which is skipped when action is 'run' (rather than 'conflict'). Without always() in the condition, GitHub Actions skips dependent jobs without evaluating their if conditions. This fix: 1. Adds always() so the condition is actually evaluated 2. Explicitly checks that upstream jobs (evaluate, preflight, mark-running) succeeded, since always() runs even on failure 3. Keeps the existing logic for agent_type and conflict resolution This resolves the issue where run-codex was being skipped even when: - agent_type = 'codex' - resolve-trivial-conflicts.result = 'skipped' (which should allow run) Fixes stuck PRs: stranske/Portable-Alpha-Extension-Model#1067, #1066, stranske/Trend_Model_Project#4309
Automated Status SummaryHead SHA: 1434d2c
Coverage Overview
Coverage Trend
Top Coverage Hotspots (lowest coverage)
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a GitHub Actions workflow bug where the run-codex job was being skipped when its dependency resolve-trivial-conflicts was skipped, even though the job's condition explicitly checked for that scenario. By adding always() and explicit success checks for upstream jobs, the workflow now correctly evaluates the condition and runs the Codex job when appropriate.
Key changes:
- Added
always()guard to force evaluation of therun-codexjob's if condition - Added explicit success checks for upstream dependencies (evaluate, preflight, mark-running)
- Preserved existing logic for determining when Codex should run based on conflict resolution state
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🤖 Keepalive Loop StatusPR #703 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
Problem
The
run-codexjob inagents-keepalive-loop.ymldepends onresolve-trivial-conflicts, which is skipped whenactionis'run'(rather than'conflict').In GitHub Actions, when a job you depend on is skipped, your job is also skipped without evaluating its
ifcondition—unless you usealways().Root Cause
Even though the condition checks for
result == 'skipped', GitHub Actions never reaches theifevaluation because the dependency was skipped.Evidence
From run 20857158812:
The Codex job was skipped even though:
agent_type = 'codex'✓resolve-trivial-conflicts.result = 'skipped'✓ (which should allow run)Solution
Add
always()and explicitly check that upstream jobs succeeded:Affected PRs
This will unblock:
Testing
After merging this PR and syncing to consumer repos, trigger keepalive on any stuck PR and verify the Codex job runs.